/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.sonrisas.tools.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author DIEGOALV
 */
@Embeddable
public class NomenclaturacaraPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "idCara")
    private int idCara;
    @Basic(optional = false)
    @Column(name = "idNomenclatura")
    private int idNomenclatura;

    public NomenclaturacaraPK() {
    }

    public NomenclaturacaraPK(int idCara, int idNomenclatura) {
        this.idCara = idCara;
        this.idNomenclatura = idNomenclatura;
    }

    public int getIdCara() {
        return idCara;
    }

    public void setIdCara(int idCara) {
        this.idCara = idCara;
    }

    public int getIdNomenclatura() {
        return idNomenclatura;
    }

    public void setIdNomenclatura(int idNomenclatura) {
        this.idNomenclatura = idNomenclatura;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idCara;
        hash += (int) idNomenclatura;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof NomenclaturacaraPK)) {
            return false;
        }
        NomenclaturacaraPK other = (NomenclaturacaraPK) object;
        if (this.idCara != other.idCara) {
            return false;
        }
        if (this.idNomenclatura != other.idNomenclatura) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.NomenclaturacaraPK[ idCara=" + idCara + ", idNomenclatura=" + idNomenclatura + " ]";
    }
    
}
